//
//  MainViewController.h
//  NumberConverter
//
//  Created by Kyle on 10/25/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

#import "FlipsideViewController.h"
#import "SharedStrings.h"

@interface MainViewController : FlipsideViewController <FlipsideViewControllerDelegate> {
	
	IBOutlet UITextField *input;
	IBOutlet UILabel *output;
	IBOutlet UIButton *button;
    IBOutlet UILabel *base1;
    IBOutlet UILabel *base2;
	
	NSMutableString *rowOfComponent1;
	NSMutableString *rowOfComponent2;
	
}

@property (nonatomic, retain) NSMutableString *rowOfComponent1;
@property (nonatomic, retain) NSMutableString *rowOfComponent2;

- (IBAction)showInfo;
- (IBAction)convert:(id)sender;

//Binary to ** conversions
- (void)bintoDec:(NSString *)inputText fromFunction:(BOOL)fromFunc;
- (void)bintoHex:(NSString *)inputText fromFunction:(BOOL)fromFunc;
- (void)bintoOct:(NSString *)inputText fromFunction:(BOOL)fromFunc;

//Decimal to ** conversions
- (void)dectoBin:(NSString *)inputText;
- (void)dectoHex:(NSString *)inputText;
- (void)dectoOct:(NSString *)inputText;

//Hexadecimal to ** conversions
- (void)hextoBin:(NSString *)inputText fromFunction:(BOOL)fromFunc;
- (void)hextoDec:(NSString *)inputText;
- (void)hextoOct:(NSString *)inputText;

//Octal to ** conversions
- (void)octtoBin:(NSString *)inputText fromFunction:(BOOL)fromFunc;
- (void)octtoDec:(NSString *)inputText;
- (void)octtoHex:(NSString *)inputText;

@end